package lab01;

public class test11 {
    public static void main(String[] args) {

        for (int i = 2; i <= 100; i++) {

            if (isZhishu(i)) {
                System.out.println(i);
            }
        }
    }

    private static boolean isZhishu(long num) {

        long sqrt = (long) Math.sqrt(num) + 1;

        for (int i = 2; i < sqrt; i++) {
            if (num % i == 0) {
                return false;
            }
        }
        return true;
    }
}
